package com.zm.service;

import com.zm.bean.MapBean;
import com.zm.repositories.jpa.MapRepository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MapServiceImpl implements MapService {
    @Resource
    private MapRepository mRepository;


    @Override
    public List<MapBean> saveAll(List<MapBean> beanList) {
        return mRepository.saveAll(beanList);
    }

    @Override
    public MapBean save(MapBean bean) {
        return mRepository.save(bean);
    }

    @Override
    public List<MapBean> findAll() {
        return mRepository.findAll();
    }

    @Override
    public MapBean findMapBeanByCabinetNumber(String cabinetNumber) {
        return mRepository.findMapBeanByCabinetNumber(cabinetNumber);
    }

    @Override
    public List<MapBean> findMapBeansByState(int state) {
        return mRepository.findMapBeansByState(state);
    }
}
